package com.spring.cloud.practice.demo.eurekaclientfeign.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * <b><code>BookFeignService</code></b>
 * <p/>
 * Description
 * <p/>
 * <b>Creation Time:</b> 2019/8/1 16:33.
 *
 * @author huanghuayan
 * @since spring-cloud-demo
 */
@FeignClient(value = "eureka-client", fallback = BookFeignHystrixServiceImpl.class)
public interface BookFeignService {

    //此类中的方法和远程服务中contoller(即跟服务eureka-client)中的方法名和参数需保持一致
    @RequestMapping("getBook")
    public String getBook1(@RequestParam String name);
}
